]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Port to gjs-1.85/girepository-2.0
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 16 Jul 2025 17:06:34 +0000 (19:06 +0200)
committerMarge Bot <marge-bot@gnome.org>
Thu, 7 Aug 2025 07:50:40 +0000 (07:50 +0000)
gjs ported from the stand-alone gobject-introspection-1.0 to the
new girepository-2.0 library bundled with glib.

Bump the requirements for gjs/glib and adjust to the (fairly minor)
changes.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3801>

.gitlab-ci.yml
meson.build
src/main.c
src/run-js-test.c

index 1058c56b5457699b09ed70ba9c298adcd995a632..319c748d5b35fb3b1c98cd8ae278e184561539ed 100644 (file)
@@ -34,7 +34,7 @@ default:
   image: $MUTTER_CI_IMAGE
 
 variables:
-  MUTTER_CI_IMAGE: registry.gitlab.gnome.org/gnome/mutter/fedora/42:x86_64-2025-07-21.0
+  MUTTER_CI_IMAGE: registry.gitlab.gnome.org/gnome/mutter/fedora/42:x86_64-2025-08-04.0
   TARBALL_ARTIFACT_PATH: build/meson-dist/$CI_PROJECT_NAME-$CI_COMMIT_TAG.tar.xz
 
 .pipeline-guard:
index 66e1592f337680dabd77a12c5bb3b5b91d410d68..ce2215032dc2c5f6146d07cf816875bb468546ca 100644 (file)
@@ -21,9 +21,8 @@ libmutter_test_pc = 'libmutter-test-' + mutter_api_version
 ecal_req = '>= 3.33.1'
 eds_req = '>= 3.33.1'
 gcr_req = '>= 3.90.0'
-gio_req = '>= 2.79.2'
-gi_req = '>= 1.49.1'
-gjs_req = '>= 1.81.2'
+gio_req = '>= 2.85.1'
+gjs_req = '>= 1.85.1'
 gtk_req = '>= 4.0'
 mutter_req = '>= 49.beta'
 polkit_req = '>= 0.100'
@@ -73,7 +72,7 @@ ecal_dep = dependency('libecal-2.0', version: ecal_req)
 eds_dep = dependency('libedataserver-1.2', version: eds_req)
 gcr_dep = dependency('gcr-4', version: gcr_req)
 gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0')
-gi_dep = dependency('gobject-introspection-1.0', version: gi_req)
+gi_dep = dependency('girepository-2.0', version: gio_req)
 gio_dep = dependency('gio-2.0', version: gio_req)
 gio_unix_dep = dependency('gio-unix-2.0', version: gio_req)
 gjs_dep = dependency('gjs-1.0', version: gjs_req)
index af4fa8597e23d3d84b5a2d59ae860c7bb235f55e..99eca3e3c977c882daea66abbff5f4827570aed8 100644 (file)
@@ -13,7 +13,7 @@
 #include <clutter/clutter.h>
 #include <glib-unix.h>
 #include <glib/gi18n-lib.h>
-#include <girepository.h>
+#include <girepository/girepository.h>
 #include <meta/meta-context.h>
 #include <meta/meta-plugin.h>
 #include <meta/prefs.h>
@@ -133,7 +133,7 @@ shell_dbus_init (gboolean replace)
 
 #ifdef HAVE_EXE_INTROSPECTION
 static void
-maybe_add_rpath_introspection_paths (void)
+maybe_add_rpath_introspection_paths (GIRepository *repo)
 {
   ElfW (Dyn) *dyn;
   ElfW (Dyn) *rpath = NULL;
@@ -210,8 +210,8 @@ maybe_add_rpath_introspection_paths (void)
       g_debug ("Prepending RPATH directory '%s' "
                "to introsepciton library search path",
                rpath_dir->str);
-      g_irepository_prepend_search_path (rpath_dir->str);
-      g_irepository_prepend_library_path (rpath_dir->str);
+      gi_repository_prepend_search_path (repo, rpath_dir->str);
+      gi_repository_prepend_library_path (repo, rpath_dir->str);
     }
 }
 #endif /* HAVE_EXE_INTROSPECTION */
@@ -219,20 +219,23 @@ maybe_add_rpath_introspection_paths (void)
 static void
 shell_introspection_init (void)
 {
+  g_autoptr (GIRepository) repo = NULL;
 
-  g_irepository_prepend_search_path (MUTTER_TYPELIB_DIR);
-  g_irepository_prepend_search_path (SHELL_TYPELIB_DIR);
+  repo = gi_repository_dup_default ();
+
+  gi_repository_prepend_search_path (repo, MUTTER_TYPELIB_DIR);
+  gi_repository_prepend_search_path (repo, SHELL_TYPELIB_DIR);
 
   /* We need to explicitly add the directories where the private libraries are
    * installed to the GIR's library path, so that they can be found at runtime
    * when linking using DT_RUNPATH (instead of DT_RPATH), which is the default
    * for some linkers (e.g. gold) and in some distros (e.g. Debian).
    */
-  g_irepository_prepend_library_path (MUTTER_TYPELIB_DIR);
-  g_irepository_prepend_library_path (GNOME_SHELL_PKGLIBDIR);
+  gi_repository_prepend_library_path (repo, MUTTER_TYPELIB_DIR);
+  gi_repository_prepend_library_path (repo, GNOME_SHELL_PKGLIBDIR);
 
 #ifdef HAVE_EXE_INTROSPECTION
-  maybe_add_rpath_introspection_paths ();
+  maybe_add_rpath_introspection_paths (repo);
 #endif
 }
 
@@ -611,7 +614,7 @@ main (int argc, char **argv)
   context = meta_create_context (WM_NAME);
   meta_context_add_option_entries (context, gnome_shell_options,
                                    GETTEXT_PACKAGE);
-  meta_context_add_option_group (context, g_irepository_get_option_group ());
+  meta_context_add_option_group (context, gi_repository_get_option_group ());
 
   session_mode = (char *) g_getenv ("GNOME_SHELL_SESSION_MODE");
 
index 4f795252c29950229729a2ebbdf220b8381e9b2b..7a539d3a23a7288e48ffb40030389a29606c95bd 100644 (file)
@@ -30,7 +30,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include <girepository.h>
+#include <girepository/girepository.h>
 #include <gjs/gjs.h>
 
 #include "shell-global.h"
@@ -64,6 +64,7 @@ int
 main (int argc, char **argv)
 {
   GOptionContext *context;
+  g_autoptr (GIRepository) repo = NULL;
   g_autoptr (GError) error = NULL;
   ShellGlobal *global;
   GjsContext *js_context;
@@ -85,8 +86,10 @@ main (int argc, char **argv)
   global = shell_global_get ();
   js_context = _shell_global_get_gjs_context (global);
 
-  g_irepository_prepend_search_path (MUTTER_TYPELIB_DIR);
-  g_irepository_prepend_search_path (SHELL_TYPELIB_DIR);
+  repo = gi_repository_dup_default ();
+
+  gi_repository_prepend_search_path (repo, MUTTER_TYPELIB_DIR);
+  gi_repository_prepend_search_path (repo, SHELL_TYPELIB_DIR);
 
   if (argc < 2)
     {